#-------------------------------------------------------------------
# Project Invasion of the aliens 
# name game.py
# purpose dislayes how much health the player has
#
# authors Chris L'Heureux, Tyler Plante, Jackson Morse
# main author Chris L'Heureux
#
# created 12/3/12
# Copyright (C) Chris L'Heureux
# License New BSD\
#------------------------------------------------------------------  
import pygame, math, sys, random

class HealthBar():
    def __init__(self, position):
        self.surfaces = []
        for i in range(10, 110, 10):
            self.surfaces += [pygame.image.load("images/Healthbar/health"+str(i)+".png")]
        self.frame = len(self.surfaces)-1
        self.minFrame = 0
        self.surface = self.surfaces[self.frame]
        self.rect = self.surface.get_rect()
        self.place(position)
        self.health = 100
                
    def  __str__(self):
        return "I'm the Player and i am LIVING " + str
            (self.rect.center) + str(self.speed) + str(self.living)
     
    def place(self, position):
        print "I've moved to", position
        
    def update(self, newHeath):
        print "new life is " + newHealth
